using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Province_City_AreaMap : EntityTypeConfiguration<Province_City_Area>
    {
        public Province_City_AreaMap()
        {
            // Primary Key
            this.HasKey(t => t.PCA_ID);

            // Properties
            this.Property(t => t.PCA_Name)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Province_City_Area");
            this.Property(t => t.PCA_ID).HasColumnName("PCA_ID");
            this.Property(t => t.PCA_Name).HasColumnName("PCA_Name");
            this.Property(t => t.PCA_ParentID).HasColumnName("PCA_ParentID");
            this.Property(t => t.PCA_Grade).HasColumnName("PCA_Grade");
        }
    }
}
